package com.bdqn.carrental.dao;

import com.bdqn.carrental.pojo.UserEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    /**
     * 查询信息
      */
    @Select("SELECT * FROM users")
    @ResultType(UserEntity.class)
    List<UserEntity> findAll();

    /**
     *新增用户
     */
    @Insert("SELECT * FROM users")
    @ResultType(UserEntity.class)
     int  inseruser();
}
